
"""
 查询范围内的质数
"""
def GetPrimeNumber(pNum):
    val = []

    for i in range(2, pNum):
        for j in range(2, i):
            if i % j == 0:   break
        else:
            val.append(i)
    return val

"""
 判断是否为质数
"""
def ComputePrimeNumber(pNum):
    val = True
    for i in range(2, pNum):
        if pNum % i == 0 and pNum != i:
            val = False
            break
    return val


num = input("请输入一个大于数字")

if str.isdigit(num.strip()):
    pNumArr = GetPrimeNumber(int(num))
    pNumHas = ComputePrimeNumber(int(num))

    if pNumArr:
        print(pNumArr)
    if pNumHas:
        print(f"{num}是质数")
    else:
        print(f"{num}不是质数")
else:
    print(f"{num}不是一个正常的数字,请输入数字")
